<html>
<head>
    <title>size change page</title>
    <script lang="javascript">
        function addRow() {
            var row = document.createElement('div');
            row.setAttribute('class', 'row');
            row.innerHTML = "<div class=\"inner-row\">added row</div>";
            document.getElementsByClassName('container')[0].appendChild(row);
        }

        function replaceRow() {
            var myAnchor = document.getElementById("deleted");
            var replaced = document.createElement("div");
            replaced.innerHTML = "<div class=\"inner-row\">replaced row2</div>";
            replaced.setAttribute('class', 'row');
            myAnchor.parentNode.replaceChild(replaced, myAnchor);
        }
    </script>
</head>
<body>
<script lang="javascript">
    window.setTimeout(addRow, 1000);
    window.setTimeout(replaceRow, 1500);
    window.setTimeout(addRow, 2000);

</script>

<div class="newrow2" style="display: none">row not displayed</div>

<div class="container">
    <div class="row">
        <div class="inner-row">row1</div>
    </div>
    <div id="deleted" class="row">
        <div class="inner-row">row2</div>
    </div>
</div>

<script lang="javascript">
</script>
</body>
</html>